<? startScript('jquery, jquery.tools'); ?><script type="text/javascript">jQuery(function($) {
	$("ul.jt-tabs").tabs("div.jt-panes > div");

});</script><? endScript(); ?>


<form action="" method="post" enctype="multipart/form-data">

	<ul class="jt-tabs"><?
	
		foreach($DATA['langs'] as $lang) {
			?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
		} 
		
	?></ul>
	
	<div class="jt-panes">
	
		<? $t = true; 
			foreach($DATA['langs'] as $lang) { $l = $lang['text'];
	
			?><div class="jt-pane" style="<?=$t ? "display:block" : ""?>">
	
				<p><label>Title<br />
					<input type="text" class="wide" name="title[<?=$l?>]" value="<?=dat('object', 'data', $l, 'title')?>" /></label>
				</p>

				<p><label>Link<br />
					<input type="text" class="wide" name="link[<?=$l?>]" value="<?=dat('object', 'data', $l, 'link')?>" /></label>
				</p>
	
			</div><? 
		
		$t = false; } ?>
	
	</div>


	<p><label>Image (size: <?=$s[w]?> x <?=$s[h]?>)<br />
		<input type="file" name="image" class="wide" />
	</label></p>

	<? if ($d = dat('object', 'image')) { ?>
	
		<p><img src="<?=$d['fn']?>" /></p>
	
	<? } ?>
	
	<p><input type="checkbox" name="blank" value="1" <?=dat('object', 'blank') ? 'checked' : ''?> /> Открывать в новом окне</p>

	<p><input type="submit" name="save_object" value="Save" /></p>

</form>


